﻿<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/MsBuild/2003">
  <UsingTask
      TaskName="CompressorTask"
      AssemblyFile="Yahoo.Yui.Compressor.dll" />

  <PropertyGroup>
    <CssOutputFile Condition=" '$(CssOutputFile)'=='' ">..\Styles\master.css</CssOutputFile>
    <JavaScriptOutputFile Condition=" '$(JavaScriptOutputFile)'=='' ">..\Scripts\master.js</JavaScriptOutputFile>
  </PropertyGroup>

  <Target Name="MyTaskTarget">
    <!--
            ItemGroup\CssFiles or ItemGroup\JavaScriptFiles: add zero to many files you wish to include in this compression task.
                                                             Don't forget, you can use the wildcard (eg. *.css, *.js) if you feel up to it.
                                                             Finally, at least one item is required - either a css file or a js file.
                                                             
            CssFiles/JavaScriptFiles data format: Please do not touch this.
            DeleteCssFiles: [Optional] True | Yes | Yeah | Yep | True | FoSho | Fo Sho. Default is False. Anything else is False. (eg. blah = false, xxxx111 = false, etc)
            CssCompressionType: YuiStockCompression | MichaelAshsRegexEnhancements | HaveMyCakeAndEatIt or BestOfBothWorlds or Hybrid; Default is YuiStockCompression.
            ObfuscateJavaScript: [Optional] refer to DeleteCssFiles, above.
            PreserveAllSemicolons: [Optional] refer to DeleteCssFiles, above.
            DisableOptimizations: [Optional] refer to DeleteCssFiles, above.
            EncodingType: [Optional] ASCII, BigEndianUnicode, Unicode, UTF32, UTF7, UTF8, Default. Default is 'Default'.
            DeleteJavaScriptFiles: [Optional] refer to DeleteCssFiles, above.
            LineBreakPosition: [Optional] the position where a line feed is appened when the next semicolon is reached. Default is -1 (never add a line break).
                               0 (zero) means add a line break after every semicolon. (This might help with debugging troublesome files).          
            LoggingType: None | ALittleBit | HardcoreBringItOn;  Hardcore also lists javascript verbose warnings, if there are any (and there usually is :P ).
            ThreadCulture: [Optional] the culture you want the thread to run under. Default is 'en-gb'.
            IsEvalIgnored: [Optional] compress any functions that contain 'eval'. Default is False, which means a function that contains
                           'eval' will NOT be compressed. It's deemed risky to compress a function containing 'eval'. That said,
                           if the usages are deemed safe this check can be disabled by setting this value to True.
        -->
    <ItemGroup>
      <JavaScriptFiles Include="..\scripts\jquery-1.5.1.js" />
      <JavaScriptFiles Include="..\scripts\jquery.easing.1.3.js" />
      <JavaScriptFiles Include="..\scripts\jquery.event.hover-1.0.js" />
      <JavaScriptFiles Include="..\scripts\jquery.meridium.labelizer-1.1.js" />
      <JavaScriptFiles Include="..\scripts\jquery.meridium.google-translate.js" />
      <JavaScriptFiles Include="..\scripts\slides.jquery.js" />
      <JavaScriptFiles Include="..\scripts\common.js" />

      <CssFiles Include="..\styles\reset.css" />
      <CssFiles Include="..\styles\typography.css" />
      <CssFiles Include="..\styles\main.css" />
      <CssFiles Include="..\meridium\utilbar\styles\main.css" />

    </ItemGroup>
    <CompressorTask
        CssFiles="@(CssFiles)"
        DeleteCssFiles="false"
        CssOutputFile="$(CssOutputFile)"
        CssCompressionType="YuiStockCompression"
        JavaScriptFiles="@(JavaScriptFiles)"
        ObfuscateJavaScript="True"
        PreserveAllSemicolons="False"
        DisableOptimizations="Nope"
        EncodingType="Default"
        DeleteJavaScriptFiles="false"
        LineBreakPosition="-1"
        JavaScriptOutputFile="$(JavaScriptOutputFile)"
        LoggingType="ALittleBit"
        ThreadCulture="en-au"
        IsEvalIgnored="false"
            />
  </Target>
</Project>